package org.example.order.api;

import org.example.core.constant.TokenConstants;
import org.example.core.utils.R;
import org.example.order.api.module.MemberAddress;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
 * @author 小杰_cc
 * @version 1.0
 */
@FeignClient("member-service")
public interface MemberService {
    @GetMapping("/ums/front/address/list")
    R<List<MemberAddress>> address(@RequestHeader(TokenConstants.MEMBER_ID) String memberId);

    @GetMapping("/ums/front/address/{addressId}")
    R<MemberAddress> addressInfo(@PathVariable("addressId") Long addressId, @RequestHeader(TokenConstants.MEMBER_ID) String memberId);
}
